#!/opt/local/bin/python 
## 
## File         : parseConfig.py 
## 
## Author       : Rod Telford 
## 
## Date         : 971204 
## 
## Description  : Parses otto configuration files
##
## $Id: foo 35 1997-12-11 03:14:52Z cmiles $
##

import os
import string
import regex
import directive

class FS:
    def __init__(self):
	print 'shit hot ;-)'

class M:


def main():

#   fsList = directive.FSlist()
    directives = { "FS": FS, "M": M, }

    conf = open('config/fs.rules', 'r')

    if hash.has_key(str):
	hash[str]()
    
    while 1:
	line = conf.readline()
	if not line: break

	line = string.rstrip(line)

	if line[:1] != '#' and len(string.strip(line)) > 0:
	    elements = string.split(line)

	    if elements[0] == 'M':
		mess = line + '\n'

		while 1:
		    l = conf.readline()
		    if l[:1] == '.': break
		    mess = mess + l

		print mess
	
	elif elements[0] == 'FS':
	    fs = directive.FS(line)
	    fsList = fsList + fs



if __name__ == "__main__":
    main()

